package com.bps.zzant.model;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

@Entity
@Table(name = "zzant_orders_garment_items")

public class OrderGarmentItem implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 9009645291256841989L;


	private int itemId;
	private String styleNo;
	private String desc;
	private String size;
	private String color;
	private int qty;
	private BigDecimal unitPrice;
	private BigDecimal subTotal;
	private String artDesc;
	
	private OrderGarment order;

	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "orders_garment_item_id", unique = true, nullable = false)		
	public int getItemId() {
		return itemId;
	}

	public void setItemId(int itemId) {
		this.itemId = itemId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="orders_id", nullable=false)
	@JsonIgnore
	public OrderGarment getOrder() {
		return order;
	}

	public void setOrder(OrderGarment order) {
		this.order = order;
	}	
	
	@Column(name = "item_unit_price", unique = false)
	public BigDecimal getUnitPrice() {
		return unitPrice;
	}



	public void setUnitPrice(BigDecimal unitPrice) {
		this.unitPrice = unitPrice;
	}

	@Column(name = "item_subtotal_price", unique = false)
	public BigDecimal getSubTotal() {
		return subTotal;
	}

	public void setSubTotal(BigDecimal subTotal) {
		this.subTotal = subTotal;
	}

	@Column(name = "item_art_description", unique = false, nullable=true)
	public String getArtDesc() {
		return artDesc;
	}

	public void setArtDesc(String artDesc) {
		this.artDesc = artDesc;
	}

	@Column(name = "item_style_no", unique = false, nullable=true)
	public String getStyleNo() {
		return styleNo;
	}

	public void setStyleNo(String styleNo) {
		this.styleNo = styleNo;
	}
	
	@Column(name = "item_description", unique = false, nullable=true)
	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	@Column(name = "item_size", unique = false, nullable=true)
	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	@Column(name = "item_color", unique = false, nullable=true)
	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	@Column(name = "item_quantity", unique = false, nullable=false)
	public int getQty() {
		return qty;
	}

	public void setQty(int qty) {
		this.qty = qty;
	}

	public OrderGarmentItem() {
		super();
		// TODO Auto-generated constructor stub
	}

	

	
}
